home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
ShareMailGiftware
/
AmigaTalk
/
testfiles
/
TestMenu
< prev
next >
Wrap
Text File
|
2002-10-27
|
965b
|
42 lines
aScreen <- Screen new: 16r40D20001
aScreen open: 'Testing Menus:'
aWindow <- Window new: 'Test the Menus:'
aWindow setFlags: 16r1008 "ACTIVATE + CLOSE"
aWindow setIDCMPFlags: 16r300 "MENUPICK + CLOSEWINDOW"
aWindow openOnScreen: aScreen
prj <- MenuItem new: #(1 'PROJECT' '' 0 0)
load <- MenuItem new: #(2 'Load...' 'L' 0 'load')
about <- MenuItem new: #(2 'About..' 'I' 0 'about')
bar <- MenuItem new: #(2 -1 '' 0 0)
quit <- MenuItem new: #(2 'Quit' 'Q' 0 'quit')
end <- MenuItem new: #(0 '' '' 0 0)
menuStrip <- NewMenu new: 6
menuStrip setItem: 1 to: prj
menuStrip setItem: 2 to: load
menuStrip setItem: 3 to: about
menuStrip setItem: 4 to: bar
menuStrip setItem: 5 to: quit
menuStrip setItem: 6 to: end
menuStrip registerTo: aWindow
menuStrip displayMenus
rval <- String new
rval <- aWindow handleIntuition
('User selected ', rval) print
menuStrip hideMenus
aWindow close
aScreen close
menuStrip dispose